<template>
        <h1>子组件</h1>
        <h1>{{ money }}</h1>
        <button @click="emit('update:money',money+1)">
            点击传参
        </button>
</template>
<script setup>
// 1. 接收父组件传过来的值
    defineProps({
        money:Number
    })
// 2. 获取父组件的自定义事件
   let emit =  defineEmits(['update:money'])
</script>
<style>
.box {
    min-height: 200px;
    border: 1px solid #000;
    padding: 20px;
    box-sizing: border-box;
}
</style>